import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:online_study/mine/my_collection.dart';
import 'package:online_study/theme/colors.dart';
import 'package:online_study/theme/size.dart';

//学习统计
class StatisticalLearningPage extends StatefulWidget {
  @override
  _StatisticalLearningPageState createState() =>
      _StatisticalLearningPageState();
}

class _StatisticalLearningPageState extends State<StatisticalLearningPage> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.symmetric(horizontal: ThemeSize.width9),
      padding: EdgeInsets.symmetric(vertical: ThemeSize.height12),
      decoration: BoxDecoration(
          color: ThemeColor.colorWhite,
          borderRadius: BorderRadius.circular(ThemeSize.height8)),
      child: Column(
        children: [
          Container(
            margin: EdgeInsets.only(left: ThemeSize.width12),
            alignment: Alignment.topLeft,
            child: Text("学习统计",
                style: TextStyle(
                    color: ThemeColor.color333333,
                    fontSize: ThemeSize.sp14,
                    fontWeight: FontWeight.bold)),
          ),
          Row(
            children: [
              Flexible(
                  child: Column(
                children: [
                  Container(
                    alignment: Alignment.center,
                    margin: EdgeInsets.only(top: ThemeSize.height12),
                    child: Text("23分钟",
                        style: TextStyle(
                            color: ThemeColor.color333333,
                            fontSize: ThemeSize.sp13,
                            fontWeight: FontWeight.bold)),
                  ),
                  Container(
                    alignment: Alignment.center,
                    margin: EdgeInsets.only(top: ThemeSize.height10),
                    child: Text("累计学习",
                        style: TextStyle(
                            color: ThemeColor.color333333,
                            fontSize: ThemeSize.sp11)),
                  )
                ],
              )),
              Flexible(
                  child: Column(
                children: [
                  Container(
                    alignment: Alignment.center,
                    margin: EdgeInsets.only(top: ThemeSize.height10),
                    child: Text("23分钟",
                        style: TextStyle(
                            color: ThemeColor.color333333,
                            fontSize: ThemeSize.sp13,
                            fontWeight: FontWeight.bold)),
                  ),
                  Container(
                    alignment: Alignment.center,
                    margin: EdgeInsets.only(top: ThemeSize.height10),
                    child: Text("今日学习",
                        style: TextStyle(
                            color: ThemeColor.color333333,
                            fontSize: ThemeSize.sp11)),
                  )
                ],
              )),
              Flexible(
                  child: GestureDetector(
                child: Column(
                  children: [
                    Container(
                      alignment: Alignment.center,
                      margin: EdgeInsets.only(top: ThemeSize.height10),
                      child: Text("2",
                          style: TextStyle(
                              color: ThemeColor.color333333,
                              fontSize: ThemeSize.sp13,
                              fontWeight: FontWeight.bold)),
                    ),
                    Container(
                      alignment: Alignment.center,
                      margin: EdgeInsets.only(top: ThemeSize.height10),
                      child: Text("收藏课程 >",
                          style: TextStyle(
                              color: ThemeColor.color333333,
                              fontSize: ThemeSize.sp11)),
                    )
                  ],
                ),
                onTap: () {
                  Get.to(() => MyCollectionPage());
                },
              ))
            ],
          )
        ],
      ),
    );
  }
}
